package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@FeignClient(value = "service-cart")
public interface CartInfoFeignClient {
    //加入商品到购物车
    @PostMapping("/api/cart/addToCart/{skuId}/{skuNum}")
    public void addToCart(@PathVariable Long skuId, @PathVariable Integer skuNum);

    //查看购物车里面的内容
    @GetMapping("/api/cart/toCart/{skuId}")
    public CartInfo toCart(@PathVariable Long skuId);

    //查询商品清单  查询购物车中已经选中的商品集合
    @GetMapping("/api/cart/getCartInfoListByChecked")
    public List<CartInfo> getCartInfoListByChecked();
}
